package com.zpb.framework.utils;

import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

/**
 * @Description:
 * @Author: zhaopengbo
 * @Date: 2025/9/11
 */
public class ServletUtil {
    public static void renderString(HttpServletResponse response, String str) {
        response.setStatus(200);
        response.setContentType("application/json");
        response.setCharacterEncoding("utf-8");
        try {
            response.getWriter().write(str);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
